/*
 * Copyright 2006 Mark Bakker <bakker.mark AT gmail.com>
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package com.google.gwt.vector.client.impl;

import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.Element;

/**
 *
 */
public class VMLImpl {

  public Element createCircle() {
    return DOM.createElement("v:oval");
  }

  public Element createFill() {
    return DOM.createElement("v:fill");
  }

  public Element createLine() {
    return DOM.createElement("v:line");
  }

  public Element createPolyline() {
    return DOM.createElement("v:polyline");
  }

  public Element createRectangle() {
    return DOM.createElement("v:rect");
  }

  public Element createStroke() {
    return DOM.createElement("v:stroke");
  }

  public Element createVectorGroup() {
    return DOM.createElement("v:group");
  }

  public void setAttributeNS(Element elem, String attr, String value) {
    DOM.setAttribute(elem, attr, value);
  }

  public void setCoordX(Element element, double coordinateX) {
    DOM.setStyleAttribute(element, "left", String.valueOf(coordinateX));
  }

  public void setCoordY(Element element, double coordinateY) {
    DOM.setStyleAttribute(element, "top", String.valueOf(coordinateY));
  }

  public void setHeight(Element element, double height) {
    DOM.setStyleAttribute(element, "height", String.valueOf(height));
  }

  public void setWidth(Element element, double width) {
    DOM.setStyleAttribute(element, "width", String.valueOf(width));
  }

}
